import request from '../request.js'

// 根据用户昵给成员称新增权限
export const addAuthByUsernameApi = (data) => {
  return request.post('auth/memeber/add/username', data)
}

// 根据用户昵给成员称新增权限
export const removeAuthByUsernameApi = (data) => {
  return request.post(`/auth/memeber/delete/username`, data)
}


// 获取成员权限
export const getUserAuthApi = (data) => {
  return request.get(`/auth/memeber/get/all?pageNum=${ data.pageNum }&pageSize=${ data.pageSize }&name=${ data.name }`)
}

// 查询所有系统权限
export const getAllAuthApi = (data) => {
  return request.get(`/auth/system/get/all`)
}

// 修改权限名称
export const updateAuthNameApi = (data) => {
  return request.post('/auth/system/update/authName', data)
}


